<?php

namespace App\Providers;

class RedisServiceProvider extends AbstractServiceProvider
{
    /**
     * The Service name.
     * @var string
     */
    protected $serviceName = 'redis';

    /**
     * Register application service.
     *
     * @return void
     */
    public function register()
    {
        $this->di->setShared(
			$this->serviceName, 
			function () {
				 $redis = new \Redis(); 
				 $redis->connect("127.0.0.1",6379);
				 return $redis;
			}
		);
    }
}
